package ru.tomsk.autovokzal.tools.networking.command;

import java.util.Map;

/**
 * Класс комманда
 * 
 * @author Dolgov_Alexandr
 * 
 */
public class Command {
	public static final String apiUser = "apiUser";
	public static final String sign = "sign";
	public static final String method = "method";
	public static final String signAuth = "signAuth";
	private Map<String, String> parametrs;

	public Command(Map<String, String> parametrs) {
		super();
		this.setParametrs(parametrs);
	}

	@Override
	public String toString() {
		return "Command [parametrs=" + getParametrs() + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((getParametrs() == null) ? 0 : getParametrs().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Command other = (Command) obj;
		if (getParametrs() == null) {
			if (other.getParametrs() != null)
				return false;
		} else if (!getParametrs().equals(other.getParametrs()))
			return false;
		return true;
	}

	/**
	 * @return the parametrs
	 */
	protected Map<String, String> getParametrs() {
		return parametrs;
	}

	/**
	 * @param parametrs
	 *            the parametrs to set
	 */
	protected void setParametrs(Map<String, String> parametrs) {
		this.parametrs = parametrs;
	}

}
